package common

const (
	SystemMsgType = "SystemMsgType"

	LoginRequestMsgType = "LoginRequestMsgType"
	LoginResponseMsgType = "LoginResponseMsgType"

	RegisterRequestMsgType = "RegisterRequestMsgType"
	RegisterResponseMsgType = "RegisterResponseMsgType"

	GetOnlineUsersRequestMsgType = "GetOnlineUsersRequestMsgType"
	GetOnlineUsersResponseMsgType = "GetOnlineUsersResponseMsgType"

	MassMessageRequestMsgType = "MassMessageRequestMsgType"
	MassMessageResponseMsgType = "MassMessageResponseMsgType"
	MassMessageSuccessResponseMsgType = "MassMessageSuccessResponseMsgType"
)

//传递消息结构体
type Message struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

//系统消息结构体
type SystemMsg struct {
	Info string `json:"info"`
}

//登录请求的消息结构体
type LoginRequestMsg struct {
	Account string `json:"account"`
	Password string `json:"password"`
}

//登录返回的消息结构体
type LoginResponseMsg struct {
	Code int `json:"code"`
	Msg string `json:"msg"`
	Name string `json:"name"`
}

//注册请求的消息结构体
type RegisterRequestMsg struct {
	Account string `json:"account"`
	Password string `json:"password"`
	Name string `json:"name"`
}

//注册返回的消息结构体
type RegisterResponseMsg struct {
	Code int `json:"code"`
	Msg string `json:"msg"`
	Name string `json:"name"`
}